fix: reset search counter index when search string changes#290
fix: reset search counter index when search string changes#290sakshammjn wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughA new Changeset document is added to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/warm-mugs-clean.md:
- Line 5: The changelog line contains a typo "coutner" — update the text to
"counter" so the sentence reads "search counter resetting to valid index when
search string changes"; edit the string in the .changeset entry (the line
containing "search coutner") to correct the misspelling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 73a64770-79fe-4b83-a141-6b4bc1586eeb
📒 Files selected for processing (2)
.changeset/warm-mugs-clean.mdsrc/components/GraphView.tsx
Signed-off-by: Saksham Mahajan <84372129+sakshammjn@users.noreply.github.com>
Preview Deployed!
Last updated at 2026-04-05T17:05:54Z |
Summary
This PR fixes a search bug where the match counter could show an invalid index after refining the search query (for example, 7/2).
The fix resets the active match index to the first valid result whenever the search results are recalculated, keeping:
What kind of change does this PR introduce
Issue Number
Closes #281
Video
Screen.Recording.2026-04-05.at.3.37.32.PM.1.mov
Does this PR introduce a breaking change?
No
If relevant, did you update the documentation?
No, not required
Summary by CodeRabbit